import {
  post
} from "../http.js";
let api = process.env.VUE_APP_API;
if (process.env.VUE_APP_Mock == "true") {
  api = "/mock/";
}

/**
 * 按需引入
 */

// 1.获取房间列表
export const list = async (p) =>
  await post(api + "/witness/weeon/jzgly/managementsubsystem/room/list", p);

// 2.修改房间信息
export const edit = async (p) =>
  await post(api + "/witness/weeon/jzgly/managementsubsystem/room/edit", p);

// 3.获取房间对象
export const query = async (p) =>
  await post(api + "/witness/weeon/jzgly/managementsubsystem/room/query", p);

// 4.获取设备列表
export const deviceList = async (p) =>
  await post(api + "/witness/weeon/jzgly/managementsubsystem/device/list", p);

// 5.初始化数据
export const initRoom = async (p) =>
  await post(api + "/witness/weeon/jzgly/managementsubsystem/room/init", p);
